package com.shenglue.ssi.service;

import java.util.List;

import com.shenglue.ssi.dao.BuyBackDetailDao;
import com.shenglue.ssi.dao.BuyBackMainDao;
import com.shenglue.ssi.domain.BuyBackDetail;

public class BuyBackDetailServiceImpl implements BuyBackDetailService {

	private BuyBackDetailDao buyBackDetailDao;

	public BuyBackDetailDao getBuyBackDetailDao() {
		return buyBackDetailDao;
	}

	public void setBuyBackDetailDao(BuyBackDetailDao buyBackDetailDao) {
		this.buyBackDetailDao = buyBackDetailDao;
	}

	/**
	 * 查询某入库退货单的 所有入库退货单细表信息
	 */
	public List<BuyBackDetail> selectAllBuyBackDetail( int buyBackId ) {
		return buyBackDetailDao.selectAllBuyBackDetail( buyBackId );
	}

	/**
	 * 增加入库退货单细表记录
	 */
	public boolean saveBuyBackDetail( BuyBackDetail buyBackDetail ) {
		return buyBackDetailDao.saveBuyBackDetail( buyBackDetail );
	}
	/**
	 * 删除入库退货单细表记录
	 */
	public boolean deleteBuyBackDetail( int buyBackDetailId ) {
		return buyBackDetailDao.deleteBuyBackDetail( buyBackDetailId );
	}
	/**
	 * 修改入库退货单细表记录
	 */
	public boolean updateBuyBackDetail( BuyBackDetail buyBackDetail ) {
		return buyBackDetailDao.updateBuyBackDetail( buyBackDetail );
	}

	/**
	 * 为修改，根据 Id 查一条 入库退货单子表记录
	 */
	public BuyBackDetail getOneBuyBackDetailForUpdate( int buyBackDetailId ) {
		return buyBackDetailDao.getOneBuyBackDetailForUpdate( buyBackDetailId );
	}
}
